//
//  WMLayout.h
//  UI27_自定义layout
//
//  Created by Marry W. on 16/1/13.
//  Copyright © 2016年 www.lanou3g.com 蓝鸥科技. All rights reserved.
//

#import <UIKit/UIKit.h>

@class WMLayout;

@protocol WMLayoutItemHeightDelegate <NSObject>

//- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath;

// 参数1: layout
// 参数2: 位置信息
// 参数3: item宽度
- (CGFloat)layout:(WMLayout *)layout heightForItemAtIndexPath:(NSIndexPath *)indexPath width:(CGFloat)width;

@end

@interface WMLayout : UICollectionViewLayout <UITableViewDelegate>
// 影响item(x, y, w, h)的布局属性
@property (nonatomic, assign) NSInteger columCounts;/**< 列数 */
@property (nonatomic, assign) NSInteger columSpace;/**< 列间距 */
@property (nonatomic, assign) NSInteger rowSpace;/**< 行间距 */
@property (nonatomic, assign) UIEdgeInsets edgeInsets;/**< 边距 */
@property (nonatomic, assign) id<WMLayoutItemHeightDelegate> delegate;
@end







